package com.hengxinguotong.zhihuichengjian.ui.app;

import android.app.Application;

import com.google.gson.Gson;

import javax.inject.Singleton;

import dagger.BindsInstance;
import dagger.Component;
import dagger.android.AndroidInjector;
import dagger.android.support.AndroidSupportInjectionModule;

/**
 * TODO
 *
 * @author hjz
 * @version V1.0.0
 * @since 2018/12/22 11:32
 */

@Singleton
@Component(modules = {AppModule.class,
        BindModule.class,
        AndroidSupportInjectionModule.class})
public interface AppComponent extends AndroidInjector<MyApp>
{
    @Component.Builder
    interface Builder
    {
        @BindsInstance
        AppComponent.Builder application(Application application);

        @BindsInstance
        AppComponent.Builder gson(Gson gson);

        AppComponent build();
    }
}
